#!/usr/bin/env python
# coding=UTF-8

import time,datetime

def write_log():
	with open("spider.log" ,"a", encoding = "utf-8") as f:
		f.write("run at: %s \n" % datetime.datetime.now())

def main():
	while(True):
		write_log()
		print(datetime.datetime.now(), flush = True)
		time.sleep(5)

main()
# if __name__ == '__main__':
# 	print('pactera spider runing')
# 	main()